---
title: You must terminate the If block with an End If
keywords: vblr6.chm1018973
f1_keywords:
- vblr6.chm1018973
ms.prod: office
ms.assetid: 29df0107-df24-350d-9577-d11d4f11b06c
ms.date: 06/08/2017
---


# You must terminate the #If block with an #End If

# **If** is a conditional compilation directive. This error has the following cause and solution:



- An # **If** block was detected that isn't terminated by an # **End If**. Add an # **End If** in the appropriate position.
    

For additional information, select the item in question and press F1 (in Windows) or HELP (on the Macintosh).

